<template>
    <div class="common-layout">
        <el-container>
            <el-header>
                <navbar />
            </el-header>
            <el-container>
                <el-aside width="150px">
                    <sidebar />
                </el-aside>
                <el-container>
                    <el-main>
                        <div id="elback">
                            <el-page-header @back="onBack" title="返回" class="back">
                            <template #content>
                                <breadcrumb />
                            </template>
                        </el-page-header>
                        </div>
                        <AppMain />
                    </el-main>
                    <el-footer class="footer">
                        <a href="#" target="_blank">版权归个人所有</a>
                    </el-footer>
                </el-container>
            </el-container>
        </el-container>
    </div>
</template>
  
<script>
import Sidebar from './layout/Sidebar.vue';
import AppMain from './layout/AppMain.vue';
import Navbar from './layout/Navbar.vue';
import Breadcrumb from './layout/Breadcrumb.vue'
export default {
    name: 'Layout',
    components: {
        Sidebar,
        AppMain,
        Navbar,
        Breadcrumb
    },
    data() {
        return {
            menus: [],
        }
    },
    methods: {
        onBack() {
            this.$router.back()
        },
    }
}
</script>
<style scoped>
* {
    background-color: rgb(244, 244, 244);
    margin: 0;
    padding: 0;
}
.footer {
    display: flex;
    justify-content: center;
    font-size: 10px;
    height: 20px;
}

a {
    color: black;
}
#elback{
    height: 50px;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
}
.back{
    margin-left: 20px;
}
.header {
    padding-top: 10px;
    height: 100px;
}
</style>
    